<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增资源配置')"/>
    <th:block th:include="include :: bootstrap-select-css"/>
    <!--    <th:block th:include="include :: bootstrap-select-js" />-->
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-resources-add">
        <!--            <div class="form-group">    -->
        <!--                <label class="col-sm-3 control-label is-required">uuid：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <input name="uuid" class="form-control" type="text" required>-->
        <!--                </div>-->
        <!--            </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">资源所属环境：</label>
            <div class="col-sm-8">
                <select id="envList" class="form-control" name="resenvcode">
                    <option th:each="envList:${envList}" th:value="${envList.envCode}"
                            th:text="${envList.envCode}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">主机/IP：</label>
            <div class="col-sm-8">
                <input name="reshost" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">用户名：</label>
            <div class="col-sm-8">
                <input name="resusername" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">密码：</label>
            <div class="col-sm-8">
                <input name="respassword" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">端口：</label>
            <div class="col-sm-8">
                <input name="resport" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">remark：</label>
            <div class="col-sm-8">
                <input name="remark" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "devops/resources"
    $("#form-resources-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-resources-add').serialize());
        }
    }
</script>
</body>
</html>